import {seckList} from '../../../request/api';
const state = {
    secklist:[],//限时秒杀列表
}

const mutations = {
    CHANGE_SECKLIST(state,payload){
        state.secklist = payload;
    }
}

const actions = {
    getSecklistActiong({commit}){
        seckList().then(res=>{
            if(res.code==200){
                commit('CHANGE_SECKLIST',res.list)
            }
        })
    }
}

const getters = {
    getSeckList(state){
        return state.secklist;
    }
}

export default {
    state,mutations,actions,getters,namespaced:true
}